package com.yinkgh.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yinkgh.redis.RedisUtil;
import com.yinkgh.util.SerializeUtil;

@Controller
@SpringBootApplication
@Configuration
public class RedisApplication {
	
	@Autowired
	RedisUtil redisUtil;
	@Autowired
	RedisTemplate<String, Object> redisTemplate;
	
	@RequestMapping("/redis")
	@ResponseBody
	public String testRedis() {
		redisUtil.set("aaa", "测试aaa");
		Object redisValue1 = redisUtil.get("aaa");
		redisUtil.set("ZQQQQQQ.FRONTEND.reportsys-shiro-session:","XXXXXXX123456");
		Object redisValue2= redisUtil.get("ZQYWBG.FRONTEND.reportsys-shiro-session:");
		return redisValue1.toString() + redisValue2.toString();
	}
	
	@RequestMapping("/redisSeria")
	@ResponseBody
	public String testRedisSeria() {
		String key = "ZQQQQQQ.FRONTEND.reportsys-shiro-session:";
		Object redisValue = "";
//		redisTemplate.
//		Object redisValue= redisUtil.get
		
		
		return redisValue.toString();
	}
	
	
	
}
